three variable algebra